﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace HasuSLLib
{

    public struct Time
    {
        DateTime _time;

        public Time(int hour, int minut, int second)
        {
            _time = new DateTime(1900, 1, 1, hour, minut, second);
        }

        public int Hour
        {
            get { return Value.Hour; }
        }

        public int Minute
        {
            get { return Value.Minute; }
        }

        public int Second
        {
            get { return Value.Second; }
        }

        public DateTime Value
        {

            get
            {
                if (_time.Year == 1 && _time.Month == 1 && _time.Day == 1)
                    _time = new DateTime(1900, 1, 1, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
                return _time;
            }
            set
            {
                _time = value;
            }
        }

        //private void SetTime()
        //{
        //    if (_time == null)
        //        _time = new DateTime(1900, 1, 1);
        //}

    }
}
